<?php
namespace Utils;
require_once __DIR__."/../Model/User.php";
require_once __DIR__."/../Utils/Contains.php";

use Model\User;
use Utils\Contains;
/**
 * Description of UserUtils
 *
 * @author Administrator
 */
class UserUtils {
    //put your code here
    //put your code here
     public static function login($data) {
       $user=new User();
       $res=$user->getkey((Array)json_decode($data));
       $res= (Array)json_decode($res);
       return json_encode($res);
    }
    public static function Jion($data) {
         $user=new User();
        $user->create((Array)json_decode($data));
         return  $user->jion();
    }
    public static function changepwd($data) {
         $user=new User();
         if($user->changepwd((Array)json_decode($data)))
         {
             return array("code"=>200);
         }
         else
             return array("code"=>400);
    }
}